<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Address</title>
</head>

<body>
    <script src="https://cdn.bootcdn.net/ajax/libs/Mock.js/1.0.1-beta3/mock-min.js"></script>
    <h2>F12打开控制台查看数据，效果更佳</h2>
    <div class="box">
        展示内容:<div id="content"></div>
    </div>
    <script>
        let Random = Mock.Random;
        //生成数据
        list = Mock.mock({
            address_1: Random.region(),
            // => "华北"
            address_2: Random.province(),
            // => "黑龙江省"
            address_3: Random.city(),
            // => "唐山市"
            address_4: Random.city(true),
            // => "福建省 漳州市"
            address_5: Random.county(),
            // => "上杭县"
            address_6: Random.county(true),
            // => "甘肃省 白银市 会宁县"
            address_7: Random.zip(),
            // => "908812"

        })

        //展示数据
        console.table(list)
        x = document.getElementById("content");
        //将对象转为JSON
        x.innerHTML = JSON.stringify(list, null, '<br />');
    </script>

</body>

</html>